package com.jiejie.controller;


import com.jiejie.commons.ServerResponse;
import com.jiejie.entity.Collect;
import com.jiejie.entity.Likes;
import com.jiejie.service.ICollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

import javax.annotation.Resource;
import java.time.LocalDateTime;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 辰广
 * @since 2022-10-05
 */
@RestController
public class CollectController {
    @Resource
        private ICollectService collectService;
    @GetMapping("isCollect")
    public boolean isCollect(@RequestParam("movieId") Integer movieId,@RequestParam("customerId")Integer customerId){
        return collectService.isCollect(movieId,customerId);
    }

    @GetMapping("pdCollect")
    public ServerResponse pdCollect(@RequestParam("movieId") Integer movieId, @RequestParam("customerId")Integer customerId, @RequestParam("pdCollect")Integer pdCollect){
        return collectService.pdCollect(movieId,customerId,pdCollect);
    }

}
